<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link href="css/common.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="css/webim.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="css/window.css" rel="stylesheet" type="text/css" media="screen"/>
<style type="text/css">
#test_table div{background:red;}
</style>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="js/im.js"></script>
<script type="text/javascript" src="js/json2.js"></script>
<script type="text/javascript">
function testWindow(){
		var d = dom.newNode('div');
		d.innerHTML='This is test<br/>This is test<br/>This is test<br/>This is test<br/>This is test<br/>This is test<br/>This is test<br/>This is test<br/>';
		var w = new publicWindow(d, '我的好友列表'+ (III++),200);
		w.cssNameSpace = 'im_window';
		w.init();
}

function showTime(){
	var d = new Date();
	debug(d.getHours()+':'+d.getMinutes()+':'+d.getSeconds());
}
function testChat(nickName){
	var imData = {
		'userinfo': {
			'nkname': nickName,
			'status': 1,
			'avatar':'icon/im/avatar.gif'
		},
		'imclass': [
			{'clsid':1,'grpname':'大学同学'},
			{'clsid':2,'grpname':'同事们'},
			{'clsid':3,'grpname':'校友'},
			{'clsid':4,'grpname':'亲戚朋友'},
			{'clsid':5,'grpname':'自行车好友'}
		],
		'buddies': [
			{'nkname':arguments[1],'clsid':1,'ico':'icon/im/online.gif', 'online': 1},
			{'nkname':arguments[2],'clsid':1,'ico':'icon/im/online.gif', 'online': 1},
			{'nkname':arguments[3],'clsid':1,'ico':'icon/im/online.gif', 'online': 1},
			{'nkname':'小A','clsid':1,'ico':'icon/im/online.gif', 'online': 1},
			{'nkname':'小B','clsid':2,'ico':'icon/im/online.gif', 'online': 0},
			{'nkname':'小C','clsid':2,'ico':'icon/im/online.gif', 'online': 1},
			{'nkname':'小D','clsid':3,'ico':'icon/im/online.gif', 'online': 1},
			{'nkname':'小E','clsid':3,'ico':'icon/im/online.gif', 'online': 0},
			{'nkname':'小F','clsid':4,'ico':'icon/im/online.gif', 'online': 1},
			{'nkname':'小G','clsid':4,'ico':'icon/im/online.gif', 'online': 1},
			{'nkname':'小H','clsid':5,'ico':'icon/im/online.gif', 'online': 1},
			{'nkname':'小I','clsid':5,'ico':'icon/im/online.gif', 'online': 1},
			{'nkname':'小J','clsid':5,'ico':'icon/im/online.gif', 'online': 1},
			{'nkname':'小K','clsid':5,'ico':'icon/im/online.gif', 'online': 1},
			{'nkname':'小L','clsid':5,'ico':'icon/im/online.gif', 'online': 1},
			{'nkname':'小M','clsid':5,'ico':'icon/im/online.gif', 'online': 1},
			{'nkname':'小N','clsid':5,'ico':'icon/im/online.gif', 'online': 1}
		],
		'groups': [
			{'gname':'羽毛球爱好者'},
			{'gname':'足球爱好者'},
			{'gname':'篮球爱好者'}
		]
	}
	webIm.init(imData);
}
</script>
<title>webim</title>
</head>
<body>
<input type="button" onclick="testWindow();" value="TestWindow"/><br/>
<input type="button" onclick="testChat('huangsz','bluebird','popeyes_hsz','蓝鸟');" value="chat_huangsz"/><br/>
<input type="button" onclick="testChat('bluebird','huangsz','popeyes_hsz','蓝鸟');" value="chat_bluebird"/><br/>
<input type="button" onclick="testChat('popeyes_hsz','huangsz','bluebird','蓝鸟');" value="chat_popeyes_hsz"/><br/>
<input type="button" onclick="testChat('蓝鸟','huangsz','bluebird','popeyes_hsz');" value="chat_蓝鸟"/><br/>
<input type="button" onclick="bluebirdDialog.alert('this.test<br/>this.test<br/>this.test<br/>this.test<br/>');" value="test"/><br/>
<div id="teststring">This is test string</div>
<div id="debug"></div>
<script>    
//for (p in dom.getById('debug').style) debug(p);
</script> 
</body>
</html>